/*
 * @Author: your name
 * @Date: 2022-04-18 12:05:45
 * @LastEditTime: 2022-04-18 16:30:52
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \my-app\src\store\reducer\user.ts
 */
import userStore from '../state/user'
import { SUB_TYPE } from '../action/index'
const userReducer = (state = userStore, action: any) => {
	switch (action.type) {
		case SUB_TYPE:
			return { ...state, total: state.total + action.data }
		default:
			return state
	}
}

export default userReducer
